$(function(){
    $("#pathUp").text('系统设置');
    $("#pathDown").text('密码修改');
    $("#up_pwd").click(function(){
        if ($("[name=password]").val() == null || $("[name=password]").val() == "") {
            art.dialog.tips('密码不能为空!');
            return;
        }
        $.ajax({
            url:window.ctx +"/rest/user/uppwd",
            type:"post",
            dataType: "json",
            data: {
                username:  $("[name=userName]").val(),
                password:$("[name=password]").val(),
            },
            success:function(data){
                if(data){
                    art.dialog.tips("修改成功");
                    location.href = window.ctx +"/user/wel";
                }else {
                    art.dialog.tips("修改失败");
                }
            }
        })
    })

})